import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    // 登录
    {
      path: '/',
      component: () => import('@/views/Login.vue')
    },
    // 首页
    {
      path: '/HomePage',
      name: 'home',
      component: HomeView,
    },
    // 设备管理
    {
      path: '/DeviceManage',
      component: () => import('@/views/DeviceManage/DeviceManage.vue')
    },
    //设备详情
    {
      path:'/DeviceDetails',
      component:() => import('@/views/DeviceManage/DeviceDetails.vue')
    },
    //清运记录
    {
      path:'/ClearReport',
      component:() => import('@/views/DeviceManage/ClearReport.vue')
    },
    //投递记录
    {
      path:'/DeliverReport',
      component:() => import('@/views/DeviceManage/DeliverReport.vue')
    },
    //上报异常
    {
      path:'/ReportAnomalies',
      component:() => import('@/views/DeviceManage/ReportAnomalies.vue')
    },
    // 异常工单
    {
      path: '/AbnormalList',
      component: () => import('@/views/AbnormalList/AbnormalList.vue')
    },
    // 异常工单处理
    {
      path:'/AbnormalListHandle',
      component:()=>import('@/views/AbnormalList/AbnormalListHandle.vue')
    },
    // 异常上报
    {
      path: '/AbnormalReport',
      component: () => import('@/views/AbnormalReport/AbnormalReport.vue')
    },
    // 清运工单
    {
      path: '/ClearAndRemoveList',
      component: () => import('@/views/ClearAndRemoveList/ClearAndRemoveList.vue')
    },
    // 清运工单/新增工单
    {
      path: '/NewWorkorder',
      component: () => import('@/views/ClearAndRemoveList/NewWorkorder.vue')
    },
    // 清运工单/历史
    {
      path: '/WorkorderHistory',
      component: () => import('@/views/ClearAndRemoveList/WorkorderHistory.vue')
    },
    // 满仓设备
    {
      path: '/FullHousesDevice',
      component: () => import('@/views/FullHousesDevice/FullHousesDevice.vue')
    },
    // 投递记录
    {
      path: '/DeliveryRecord',
      component: () => import('@/views/DeliveryRecord/DeliveryRecord.vue')
    },
  ],
})

export default router
